import { post } from "../../http/index";
import { get } from "../../http/index";
import { array_post } from "../../http/index";

//师傅列表
export const list_master = (page, pageSize, type) =>
  get(`/index/list_master?page=${page}&&pageSize=${pageSize}&type=${type}`);

//菜系名列表
export const list_cuisine = cid => get(`/index/list_cuisine?cid=${cid}`);
//根据菜系id获取相应的菜系
export const list_dish = cid => get(`/dish/list_dish?cid=${cid}`);
//根据师傅id获取师傅会做的菜
export const get_dishs_of_master = cid =>
  get(`/dish/get_dishs_of_master?cid=${cid}`);
//根据菜品id获取到会做这道菜的师傅
export const get_master_by_dishId = cid =>
  get(`/dish/get_master_by_dishId?cid=${cid}`);
//预约师傅
export const booking_master = params =>
  array_post(`/dish/booking_master`, params);
